pragma Singleton

import QtQuick

QtObject {

    property string home
    property string team
    property string project
    property string file
    property string member
    property string chat
    property string mine
    property string dark_mode
    property string sys_dark_mode
    property string search
    property string about
    property string settings
    property string locale
    property string navigation_view_display_mode
    property string other
    property string login
    property string calendar
    property string more
    
    function zh(){
        home="首页"
        team="团队"
        project="项目"
        file="文件"
        member="成员"
        chat="通讯"
        mine="我的"
        dark_mode="夜间模式"
        sys_dark_mode="跟随系统"
        search="查找"
        about="关于"
        settings="设置"
        locale="语言环境"
        navigation_view_display_mode="导航视图显示模式"
        other="其他"
        login="登录"
        calendar="日程"
        more="更多"
    }

    function en(){
        home="Home"
        team="Team"
        project="Project"
        file="File"
        member="Member"
        chat="Chat"
        mine="Profile"
        dark_mode="Dark Mode"
        sys_dark_mode="Sync with system"
        search="Search"
        about="About"
        settings="Settings"
        locale="Locale"
        navigation_view_display_mode="NavigationView Display Mode"
        other="Other"
        login="Login"
        calendar="Calendar"
        more="More"
    }

    property string __locale
    property var __localeList: ["Zh","En"]

    on__LocaleChanged: {
        if(__locale === "Zh"){
            zh()
        }else{
            en()
        }
    }

    Component.onCompleted: {
        __locale = "En"
    }

}
